include_directories(
  .
)
#aux_source_directory(${CMAKE_CURRENT_LIST_DIR} src_list)

# add_executable(iec61850_server
#   ./pcs_modbus_proc.c
#   ./pcs_modbus_registers.c
#   ./static_model.c
#   ../IPC/socket_ipc/ipc_socket.c
# )

aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/../modbus/src src_modbus)
add_executable(pcs_server
  ./pcs_server.c
  ./pcs_modbus_registers.c
  ./pcs_reg_proc.c
  ./static_model.c
  ../IPC/socket_ipc/ipc_socket.c
  ${src_modbus}
)

# target_link_libraries(iec61850_server
#     iec61850
#     xml2
#     pthread
# )

target_link_libraries(pcs_server
    iec61850
    xml2
    pthread
)

add_executable(pcs_goose_subcriber
  ./pcs_goose_subcriber.c
)

target_link_libraries(pcs_goose_subcriber
    iec61850
    xml2
    pthread
)

add_executable(pcs_report
  ./pcs_report_client.c
)

target_link_libraries(pcs_report
    iec61850
    xml2
    pthread
)

add_executable(sv_client
  ./sv_client.c
)

target_link_libraries(sv_client
    iec61850
    xml2
    pthread
)